﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _22yards.Core
{
    public class cPlayer
    {
        public string Name { get; set; }
        public int PlayerID { get; set; }
        public decimal NetMoney { get; set; }
        public bool IsOnStrike { get; set; }
        public bool InPlaying11 { get; set; }
        public bool Is12thMan { get; set; }
        public bool IsWicketKeeper { get; set; }
        public bool InSquadOf15 { get; set; }
        public bool IsRightHandedBatsman { get; set; }
        public bool IsRightHandedBowler { get; set; }
        public bool IsRightHandedFielder { get; set; }

        public short CareerBattingAura { get; set; }
        public short SeriesBattingConfidence { get; set; }
        public short CurrentBattingConfidence { get; set; }
        public short BatsmanSettledOnPitch { get; set; } //only for batsman
        public short Volatility { get; set; } //How quickly player can be unsettled

        public short CareerBowlingAura { get; set; }
        public short SeriesBowlingConfidence { get; set; }
        public short CurrentBowlingConfidence { get; set; }

        public short CareerFieldingAura { get; set; }
        public short SeriesFieldingConfidence { get; set; }
        public short CurrentFieldingConfidence { get; set; }

        //public short CareerConsistency { get; set; }
        //public short SeriesConsistency { get; set; }

        //Injury and stamina
        public bool InjuryProne { get; set; }              //yes or no, decided randomly
        public short LevelOfInjury { get; set; }             //0 to 100. 100 -> permanently disabled
        public short NumInjured { get; set; }                //Number of times injured
        public short Stamina { get; set; }
        public short Strength { get; set; }
        public short InjuryLength { get; set; }
        

        //International
        public short NumT20Matches { get; set; }
        public short Num5050Matches { get; set; }
        public short NumTestMatches { get; set; }

        public short LastT20Confidence { get; set; }
        public short PresentT20Confidence { get; set; }

        public short LastTestMatchConfidence { get; set; }
        public short PresentTestMatchConfidence { get; set; }

        public short Last5050MatchConfidence { get; set; }
        public short Present5050MatchConfidence { get; set; }

        //Streets and Parks
        public short NumStreetMatches { get; set; }
        public short NumParkMatches { get; set; }

        public short LastStreetMatchConfidence { get; set; }
        public short PresentStreetMatchConfidence { get; set; }

        public short LastParkMatchConfidence { get; set; }
        public short PresentParkMatchConfidence { get; set; }
        
        //First Class
        public short NumFirstClassT20Matches { get; set; }
        public short NumFirstClass5050Matches { get; set; }
        public short NumFirstClass4DayMatches { get; set; }
        public short NumFirstClass5DayMatches { get; set; }

        public short LastFirstClassT20MatchConfidence { get; set; }
        public short PresentFirstClassT20MatchConfidence { get; set; }

        public short LastFirstClass5050MatchConfidence { get; set; }
        public short PresentFirstClass5050MatchConfidence { get; set; }

        public short LastFirstClass4DayMatchConfidence { get; set; }
        public short PresentFirstClass4DayMatchConfidence { get; set; }

        public short LastFirstClass5DayMatchConfidence { get; set; }
        public short PresentFirstClass5DayMatchConfidence { get; set; }

        public DateTime DateOfBirth { get; set; }
        public DateTime FirstStreetMatch { get; set; }
        public DateTime FirstParkmatch { get; set; }
        public DateTime FirstT20Match { get; set; }
        public DateTime First5050Match { get; set; }
        public DateTime FirstTestMatch { get; set; }
        public DateTime FirstFirstClassT20Match { get; set; }
        public DateTime FirstFirstClass5050Match { get; set; }
        public DateTime FirstFirstClass4DayMatch { get; set; }
        public DateTime FirstFirstClass5DayMatch { get; set; }


        public cPlayer(DateTime Dob)
        {
            BattingSkillPoints = 0;
            BowlingSkillPoints = 0;
            FieldingSkillPoints = 20;
            Stamina = 20;
            Num5050Matches = 0;
            NumFirstClass4DayMatches = 0;
            NumFirstClass5050Matches = 0;
            NumFirstClass5DayMatches = 0;
            NumFirstClassT20Matches = 0;
            NumInjured = 0;
            NumParkMatches = 0;
            NumStreetMatches = 0;
            NumT20Matches = 0;
            NumTestMatches = 0;
            Present5050MatchConfidence = 0;
            PresentFirstClass4DayMatchConfidence = 0;
            PresentFirstClass5050MatchConfidence = 0;
            PresentFirstClass5DayMatchConfidence = 0;
            PresentFirstClassT20MatchConfidence = 0;
            PresentParkMatchConfidence = 0;
            PresentStreetMatchConfidence = 0;
            PresentT20Confidence = 0;
            PresentTestMatchConfidence = 0;
            LevelOfInjury = 0; 
            LastTestMatchConfidence = 0;
            LastT20Confidence = 0;
            LastStreetMatchConfidence = 0;
            LastParkMatchConfidence = 0;
            LastFirstClassT20MatchConfidence = 0;
            LastFirstClass5DayMatchConfidence = 0;
            LastFirstClass5050MatchConfidence = 0;
            LastFirstClass4DayMatchConfidence = 0;
            Last5050MatchConfidence = 0;
            DateOfBirth = Dob;
            First5050Match = System.DateTime.MinValue;
            FirstFirstClass4DayMatch = System.DateTime.MinValue;
            FirstFirstClass5050Match = System.DateTime.MinValue;
            FirstFirstClass5DayMatch = System.DateTime.MinValue;
            FirstFirstClassT20Match = System.DateTime.MinValue;
            FirstParkmatch = System.DateTime.MinValue;
            FirstStreetMatch = System.DateTime.MinValue;
            FirstT20Match = System.DateTime.MinValue;
            FirstTestMatch = System.DateTime.MinValue;
            
        }

        #region BattingSkills

        public short BattingSkillPoints { get; set; }
        public int FavouriteBattingRegion { get; set; }
        public short FavouriteBattingShot { get; set; }
        public bool BattingRightHanded { get; set; }
        
        #endregion

        #region BowlingSkills

        public short BowlingSkillPoints { get; set; }
        public short FavouriteBowlingRegion { get; set; }
        public int FastBowlingPoints { get; set; }
        public short SpinBowlingPoints { get; set; }
        public bool BowlingRighHanded { get; set;}
        public short BowlerType { get; set; }
        public short BowlingRunupLength { get; set; }
        public short BowlingRunupAngle { get; set; }

        #endregion

        #region FieldingSkills

        public short FieldingSkillPoints { get; set; }
        public int FavouriteFieldingPosition { get; set;}
        public bool FieldingRightHanded { get; set; }
        
        #endregion

    }

}
